﻿<script>
    $(document).ready(function() {
        loadDepartment();
    });
</script>
<style>
    #departmentSelected a, #department a {
        padding-top: 3px;
        padding-left: 10px;
        margin-left: 0px;
        min-height: 10px;
        color: #333;
        cursor: pointer;
    }
    .de-selected {
        background-color: #e4e4e4;
    }
</style>
<div id="departmentFilter" class="modal hide fade" data-width="700" tabindex="-1" role="dialog" aria-labelledby="addController" aria-hidden="true">
    <div class="container-fluid">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h5>Department Filter</h5>
        </div>
        <div class="modal-body">
            <div class="row-fluid">
                <div class="span5">
                    <div class="fieldset">
                        <div id="department" class="container-fluid" style="height: 358px;overflow: auto;">
                        
                        </div>
                    </div>
                </div>
                <div class="span2">
                    <a onclick ='loadDepartment();' class="btn w90" style="margin-bottom: 30px; margin-top:10px;">Refresh</a>
                    <a class="btn btn-primary w90" style="margin-bottom: 10px;" onclick="addDepartment()">Add --></a>
                    <a class="btn btn-danger w90" style="margin-bottom: 10px;" onclick="removeDepartment()"><-- Remove</a>
                </div>
                <div class="span5">
                    <div class="fieldset">
                        <div id="departmentSelected" class="container-fluid" style="height: 358px;overflow: auto;">
                        
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal-footer">
            <button class="btn btn-primary w90" data-dismiss="modal" aria-hidden="true" onclick="submitModal()">OK</button>
            <button class="btn w90" data-dismiss="modal" aria-hidden="true">Close</button>
        </div>
    </div>
</div>
<div class="container-fluid">
    <div class="row-fluid">
        <fieldset>
            <legend>Search</legend>
            <form class="margin0" method="POST" action="/products/promotionauditfilter" id="fr-promotionaudit">
                <input type="hidden" value="" name="deparmentfilter" id="hd-filter"/>
                <div class="row-fluid">
                    <div class="span3">
                        <div class="span6">ProductID</div>
                        <div class="span6">
                            <input type="text" class="input-block-level" name="productid" id="productid" />
                        </div>
                    </div>
                    <div class="span5">
                        <div class="span4">Product Name</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="productname" id="productname" />
                        </div>
                    </div>
                    <div class="span4">
                        <div class="span3">Brands</div>
                        <div class="span9">
                            @Html.DropDownList("BrandID", null, new { @class = "input-block-level" })
                        </div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span3">
                        <div class="span6">Product Option ID</div>
                        <div class="span6">
                            <input type="text" class="input-block-level" name="productoptionid" id="productoptionid" />
                        </div>
                    </div>
                    <div class="span5">
                        <div class="span4">Product Option Name</div>
                        <div class="span8">
                            <input type="text" class="input-block-level" name="productoptionname" id="productoptionname" />
                        </div>
                    </div>
                    <div class="span4">
                        <div class="span3">Supplier</div>
                        <div class="span9">
                            @Html.DropDownList("CompanyID", null, new { @class = "input-block-level" })
                        </div>
                    </div>
                </div>
                <div class="row-fluid">
                    <div class="span8" style="margin-top: 10px;">
                        @Html.Partial("Partial/_DateRange")
                    </div>
                    <div class="span4">
                        <div class="row-fluid">
                            <div class="span3">Stores</div>
                            <div class="span9">
                                @Html.DropDownList("StoreID", null, new { @class = "input-block-level" })
                            </div>
                        </div>
                        <div class="row-fluid"  style="margin-top: 20px;">
                            <div class="span12 text-right">
                                <a class="btn btn-primary" data-toggle="modal" href="#departmentFilter" id="btnDepartment">Filter Departments</a>
                                <input type="submit" class="btn btn-success" value="Search" />
                                <input type="reset" class="btn btn-warning" value="Clear" />
                            </div>
                        </div>
                    </div>

                </div>

            </form>
        </fieldset>
    </div>
    <div class="row-fluid">
        <div class="promotionauditable fieldset" style="overflow: auto;">
            <div class="row-fluid">
                <table class="table table-bordered table-fix promoaudit-table" data-height="300">
                    <thead>
                        <tr>
                            <th>Id</th>
                            <th>ProductID</th>
                            <th>ProductOptionID</th>
                            <th>ProductName</th>
                            <th>ProductOptionText</th>
                            <th>OldProductOptionBasePrice</th>
                            <th>NewProductOptionBasePrice</th>
                            <th>OldProductOptionCarriage</th>
                            <th>NewProductOptionCarriage</th>
                            <th>OldMarginPounds</th>
                            <th>NewMarginPounds</th>
                            <th>OldMarginPercentage</th>
                            <th>NewMarginPercentage</th>
                            <th>OldRetailExVAT</th>
                            <th>NewRetailExVAT</th>
                            <th>ChangedTime</th>
                            <th>UserChanged</th>
                            <th>UserName</th>
                            <th>StoreID</th>
                            <th>StoreName</th>
                            <th>DepartmentID</th>
                            <th>DeparmentName</th>
                            <th>BrandID</th>
                            <th>BrandName</th>
                            <th>CompanyID</th>
                            <th>CompanyName</th>
                        </tr>
                    </thead>
                    
                </table>
            </div>
        </div>
    </div>
</div>
